"""
__project__ = 'automation'
__file_name__ = 'homeWork_1102'
__author__ = 'wang'
__time__ = '2020/11/2 20:12'
__product_name = PyCharm

                   _ooOoo_
                  o8888888o
                  88" . "88
                  (| -_- |)
                  O\  =  /O
               ____/`---'\____
             .'  \\|     |//  `.
            /  \\|||  :  |||//  \
           /  _||||| -:- |||||-  \
           |   | \\\  -  /// |   |
           | \_|  ''\---/''  |   |
           \  .-\__  `-`  ___/-. /
         ___`. .'  /--.--\  `. . __
      ."" '<  `.___\_<|>_/___.'  >'"".
     | | :  `- \`.;`\ _ /`;.`/ - ` : | |
     \  \ `-.   \_ __\ /__ _/   .-` /  /
======`-.____`-.___\_____/___.-`____.-'======
                   `=---='
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            佛祖保佑       永无BUG
"""
"""
# ===========while循环打印1-100的和===========
num = 0
sum = 0

while num <= 100:
    sum += num
    num += 1

print('1-100的和为%s' %sum)
"""
"""
# ==========while循环打印1-100之间的偶数的和==========
num = 0
sum = 0

while num <= 100:
    if num % 2 == 0:
        sum += num
    num += 1

print('1-100之间的偶数的和为%s' %sum)
"""
"""
# ==========while打印九九乘法表==========
row = 1
while row <= 9:
    line = 1
    while line <= row:
        print('%d x %d = %-5d' % (line, row, (row * line)), end='')
        line += 1
    row += 1
    print()
"""

# ==========while打印*列表==========
row = 1
while row <= 5:
    line = 1
    while line < row:
        print('*', end='')
        line += 1
    row += 1
    print()

row = 5
while row > 0:
    line = 0
    while line < row:
        print('*', end='')
        line += 1
    row -= 1
    print()

a = 1
while a < 11:
    b = 1
    if a < 5:
        c = a
    else:
        c = 11 - a
    while b < c:
        print('*', end='')
        b += 1
    a += 1
    print()







